package com.gitee.zhangchenyan.takin.service;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

@Getter
@Setter
public class BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime creationTime;

    @ApiModelProperty("最后修改时间")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime lastModificationTime;

    @ApiModelProperty("创建人ID")
    @TableField(fill = FieldFill.INSERT)
    private Long creatorId;

    @ApiModelProperty("最后修改人ID")
    @TableField(fill = FieldFill.UPDATE)
    private Long lastModifierId;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("是否软删除 0未删除1已删除")
    @TableLogic
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer isDeleted;
}
